class CreateNodesAndEdges < ActiveRecord::Migration
  def self.up

    create_table :nodes, :force => true do |t|
      t.column :name, :string, :limit => 100, :default => "", :null => false
      t.column :gender, :string, :limit => 100, :default => "", :null => false
    end

    create_table :edges, :force => true do |t|
      t.column :source, :integer, :default => 0, :null => false
      t.column :target, :integer, :default => 0, :null => false
    end
  end

  def self.down
    drop_table :nodes
    drop_table :edges
  end
end
